#!/bin/bash

# mysql 创建用户
#```mysql
#create database jumpserver default charset 'utf8';
#create user 'jumpserver'@'%' identified by 'nu4x599Wq7u0Bn8EABh3J91G';
#grant all on jumpserver.* to 'jumpserver'@'%';
#flush privileges;
#```

docker run  --name jumpserver \
  -p 9999:80 \
  -p 2222:2222 \
  -p 30000-30100:30000-30100 \
  -e LOG_LEVEL=ERROR \
  -e DB_HOST=192.168.1.11 \
  -e DB_PORT=3306 \
  -e DB_USER=jumpserver \
  -e DB_PASSWORD=nu4x599Wq7u0Bn8EABh3J91G \
  -e DB_NAME=jumpserver \
  -e REDIS_HOST=192.168.1.11 \
  -e REDIS_PORT=6379 \
  -e REDIS_PASSWORD=123456 \
  --privileged=true \
  --restart=always \
jumpserver/jms_all


#mkdir -p /data/jumpserver
#docker run --name jms_all -dti \
#  -v /opt/jumpserver/core/data:/opt/jumpserver/data \
#  -v /opt/jumpserver/koko/data:/opt/koko/data \
#  -v /opt/jumpserver/lion/data:/opt/lion/data \
#  -p 80:80 \
#  -p 2222:2222 \
#  -p 30000-30100:30000-30100 \
#  -e SECRET_KEY=xxxxxx \
#  -e BOOTSTRAP_TOKEN=xxxxxx \
#  -e LOG_LEVEL=ERROR \
#  -e DB_HOST=192.168.x.x \
#  -e DB_PORT=3306 \
#  -e DB_USER=jumpserver \
#  -e DB_PASSWORD=weakPassword \
#  -e DB_NAME=jumpserver \
#  -e REDIS_HOST=192.168.x.x \
#  -e REDIS_PORT=6379 \
#  -e REDIS_PASSWORD=weakPassword \
#  --privileged=true \
#  --restart=always \
#  jumpserver/jms_all:v3.4.3